package com.ganbo.user.api.api.fallback;

import com.ganbo.user.api.api.UserClientApi;
import com.ganbo.user.api.model.User;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Date;


@Service
@RequestMapping("/fallBackUser")
public class UserFallbackService implements UserClientApi {

    @Override
    public User getUser(Long id, String username) {
        return User.builder().id(-2L).username("默认用户名 Get").createTime(new Date()).build();
    }

    @Override
    public User add(User user) {
        return User.builder().id(-2L).username("默认用户名 Post").createTime(new Date()).build();
    }
}
